home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Shareware / Comunicatii / feedaemon / fd110rc5.exe / {app} / Data / defaults / styles / Default (large font).fdxsl next >
Extensible Markup Language  |  2004-02-16  |  7KB  |  196 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0"
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.     xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
  6. <xsl:output method="html"/>
  7.  
  8. <xsl:variable name="common-styles">
  9.     <style type="text/css">
  10.         html { border: 6px solid gray; }
  11.         body { background-color: white; color: black; font: 100%/150% Verdana, Arial, sans-serif; margin: 12px 22px; }
  12.         a { color: #0002CA; }
  13.         a:hover { color: #6B8ADE; text-decoration: underline; }
  14.         span.nodescription {    color: silver;    font-size: smaller; }
  15.  
  16.         /* override headings used by feeds */
  17.         h1,h2,h3,h4,h5,h6 { font-size: 80%; font-weight: bold; font-style: italic;    }
  18.  
  19.         div.favchannel { 
  20.             overflow: hidden; 
  21.             /*filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#D6DFF7,endColorStr=#EEF5FC);*/
  22.             border: 1px solid #6B8ADE;
  23.             background-color: #D6DFF7; 
  24.             float: left; 
  25.             margin: 0 14px 10px 0; 
  26.             padding: 16px 16px 0 16px; width: 40%;
  27.         }
  28.  
  29.         div.newspapertitle { font-weight: bold; font-size: 120%; text-align: center; padding-bottom: 12px; text-transform: uppercase; }
  30.         div.channel { border-bottom: 1px dotted silver; margin-top: 14px}
  31.         div.channeltitle { font-weight: bold; text-transform: uppercase; margin-top: 12px; margin-bottom: 18px;}
  32.         img.channel { border: none; }
  33.  
  34.         div.newsitemcontent { line-height: 140%; }
  35.         div.newsitemcontent ol, div.newsitemcontent ul { list-style-position: inside;}        
  36.         div.newsitemtitle { font-weight: bold; margin-bottom: 8px }
  37.         div.newsitemfooter { color: gray; font-size: xx-small; text-align: left; margin-top: 6px; margin-bottom: 18px; }
  38.  
  39.         div.newsitemtitle a, div.newsitemcontent a, div.newsitemfooter a { text-decoration: none; }
  40.     </style>
  41. </xsl:variable>
  42.  
  43. <!-- channel group newspaper -->
  44. <xsl:template match="newspaper[@type='group']">
  45.     <html xmlns:m="http://www.w3.org/1998/Math/MathML">
  46.     <head>
  47.         <title>Group Newspaper</title>
  48.         <xsl:copy-of select="$common-styles"/>
  49.         <style>
  50.             div.channeltitle a, div.newsitemtitle a {    color: black; }
  51.         </style>
  52.     </head>
  53.     <body>
  54.         <div class="newspapertitle"><xsl:value-of select="title" disable-output-escaping="yes"/></div>        
  55.         
  56.         <!-- loop through each channel -->
  57.         <xsl:for-each select="channel">
  58.             <xsl:variable name="chanlink" select="link"/>
  59.             <xsl:variable name="chantitle"/>
  60.         
  61.             <!-- determine the class based on whether this is the 'favorite' channel -->
  62.             <div>
  63.                 <xsl:attribute name="class">
  64.                     <xsl:choose>
  65.                         <xsl:when test="@favorite">
  66.                             <xsl:text>favchannel</xsl:text>
  67.                          </xsl:when>
  68.                          <xsl:otherwise>
  69.                             <xsl:text>channel</xsl:text>
  70.                         </xsl:otherwise>
  71.                     </xsl:choose>
  72.                 </xsl:attribute>
  73.                 
  74.                 <div class="channeltitle">
  75.                     <!-- channel image -->
  76.                     <xsl:if test="image">
  77.                       <xsl:variable name="imgurl" select="image/url"/>
  78.                       <xsl:variable name="imgtitle" select="image/title"/>
  79.                       <xsl:variable name="imglink" select="image/link"/>
  80.                       <a href="{$imglink}"><img class="channel" src="{$imgurl}" alt="{$imgtitle}" align="right" style="margin-left: 8px"/></a>
  81.                     </xsl:if>
  82.                     <!-- channel title -->
  83.                     <a href="{$chanlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  84.                 </div>
  85.                 
  86.                 <!-- loop through each news item -->
  87.                 <xsl:for-each select="item">
  88.                     <xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
  89.                    <div class="newsitemtitle">
  90.                       <xsl:variable name="itemlink" select="link"/>
  91.                        <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  92.                     </div>
  93.                     <div class="newsitemcontent">
  94.                         <xsl:value-of select="description" disable-output-escaping="yes"/>
  95.                     </div>
  96.                     <div class="newsitemfooter"><xsl:value-of select="fd:dateDisplay"/></div>
  97.                   </xsl:for-each>
  98.             </div> <!-- close the channel div -->
  99.         </xsl:for-each>
  100.     </body>
  101.     </html>    
  102. </xsl:template>
  103.  
  104. <!-- channel newspaper -->
  105. <xsl:template match="newspaper[@type='channel']">
  106.     <html xmlns:m="http://www.w3.org/1998/Math/MathML">
  107.     <head>
  108.         <title>Channel Newspaper</title>
  109.         <xsl:copy-of select="$common-styles"/>
  110.         <style>
  111.             div.newspapertitle { margin-bottom: 12px; border-bottom: 1px dashed silver;  }
  112.         </style>
  113.     </head>
  114.     <body>
  115.         <div class="newspapertitle">
  116.             <!-- channel title -->        
  117.             <xsl:value-of select="title" disable-output-escaping="yes"/>
  118.             <!-- channel image -->
  119.             <xsl:if test="channel/image">
  120.               <xsl:variable name="imgurl" select="channel/image/url"/>
  121.               <xsl:variable name="imgtitle" select="channel/image/title"/>
  122.               <xsl:variable name="imglink" select="channel/image/link"/>
  123.               <br/>
  124.               <a href="{$imglink}"><img class="channel" src="{$imgurl}" alt="{$imgtitle}" align="bottom" style="margin-top: 8px;"/></a>
  125.             </xsl:if>
  126.         </div>
  127.         
  128.         <!-- loop through each news item -->
  129.         <xsl:for-each select="channel/item">
  130.             <xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
  131.            <div class="newsitemtitle">
  132.               <xsl:variable name="itemlink" select="link"/>
  133.                <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  134.             </div>
  135.             <div class="newsitemcontent">
  136.                 <xsl:value-of select="description" disable-output-escaping="yes"/>
  137.             </div>
  138.             <div class="newsitemfooter">
  139.                 <xsl:value-of select="fd:dateDisplay"/>
  140.             </div>
  141.           </xsl:for-each>
  142.         
  143.     </body>
  144.     </html>
  145. </xsl:template>
  146.  
  147. <!-- single news item -->
  148. <xsl:template match="newspaper[@type='newsitem']">
  149.     <html xmlns:m="http://www.w3.org/1998/Math/MathML">
  150.     <head>
  151.         <title>News Item</title>
  152.         <xsl:copy-of select="$common-styles"/>
  153.         <style>
  154.             div.newsitemtitle { border-bottom: 1px dotted silver; margin-bottom: 10px; padding-bottom: 10px;}
  155.             div.newsitemfooter { text-align: right; margin-top: 14px; padding-top: 6px; border-top: 1px dashed #CBCBCB; }
  156.         </style>
  157.     </head>
  158.     <body>
  159.         <xsl:for-each select="channel/item">        
  160.            <div class="newsitemtitle">
  161.               <xsl:variable name="itemlink" select="link"/>
  162.                <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  163.             </div>
  164.             <div class="newsitemcontent">
  165.                 <xsl:value-of select="description" disable-output-escaping="yes"/>
  166.             </div>
  167.             <div class="newsitemfooter">
  168.                 <!-- 
  169.                 Important: use 'source' element here so that source channel shows for 
  170.                 newsbins and watches.  For other channels, FeedDemon sets the source
  171.                 to the channel itself.
  172.                 -->
  173.                 <xsl:variable name="srclink" select="source/@htmlUrl"/>
  174.                 <a href="{$srclink}"><xsl:value-of select="source"/></a>
  175.                 <!-- add link to comments if available -->
  176.                 <xsl:if test="comments">
  177.                     <xsl:variable name="commentlink" select="comments"/>
  178.                     <xsl:variable name="commentimg" select="'$IMAGEDIR$comments.gif'"/>
  179.                     <a href="{$commentlink}"><img src="{$commentimg}" border="0" hspace="6"/></a>
  180.                 </xsl:if>
  181.                 <!-- add link to enclosure if available -->
  182.                 <xsl:if test="enclosure">
  183.                     <xsl:variable name="enclosurelink" select="enclosure/@url"/>
  184.                     <xsl:variable name="enclosureimg" select="'$IMAGEDIR$enclosure.gif'"/>
  185.                     <a href="{$enclosurelink}"><img src="{$enclosureimg}" border="0" hspace="6"/></a>
  186.                 </xsl:if>
  187.                 <br />
  188.                 <xsl:value-of select="fd:dateDisplay"/>
  189.             </div>
  190.           </xsl:for-each>
  191.         
  192.     </body>
  193.     </html>
  194. </xsl:template>
  195.  
  196. </xsl:stylesheet>